package com.ly.mpayment.persist.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * UpOrderRefund entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="uporderrefund"

)

public class UpOrderRefund  implements java.io.Serializable {


    // Fields

     private String uprefunduuid;
     private User user;
     private UpOrder upOrder;
     private Date uprefundtime;
     private BigDecimal uprefundamount;
     private String uprefundstatus;
     private BigDecimal balance;

    // Constructors

    /** default constructor */
    public UpOrderRefund() {
    }


    /** full constructor */
    public UpOrderRefund(User user, UpOrder upOrder, Date uprefundtime, BigDecimal uprefundamount, String uprefundstatus) {
        this.user = user;
        this.upOrder = upOrder;
        this.uprefundtime = uprefundtime;
        this.uprefundamount = uprefundamount;
        this.uprefundstatus = uprefundstatus;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="uprefunduuid", unique=true, nullable=false, length=40)

    public String getUprefunduuid() {
        return this.uprefunduuid;
    }

    public void setUprefunduuid(String uprefunduuid) {
        this.uprefunduuid = uprefunduuid;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="useruuid")

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="uporderuuid")

    public UpOrder getUpOrder() {
        return this.upOrder;
    }

    public void setUpOrder(UpOrder upOrder) {
        this.upOrder = upOrder;
    }

    @Column(name="uprefundtime", length=19)

    public Date getUprefundtime() {
        return this.uprefundtime;
    }

    public void setUprefundtime(Date uprefundtime) {
        this.uprefundtime = uprefundtime;
    }

    @Column(name="uprefundamount", precision=28, scale=5)

    public BigDecimal getUprefundamount() {
        return this.uprefundamount;
    }

    public void setUprefundamount(BigDecimal uprefundamount) {
        this.uprefundamount = uprefundamount;
    }

    @Column(name="uprefundstatus", length=40)

    public String getUprefundstatus() {
        return this.uprefundstatus;
    }

    public void setUprefundstatus(String uprefundstatus) {
        this.uprefundstatus = uprefundstatus;
    }


    @Column(name="balance", precision=28, scale=5)
    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }







}
